Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Don't change file encoding unnecessarily. - #2009

Merged
jcansdale merged 2 commits into
masterfrom
fixes/1908-unicode-error
Oct 29, 2018
Merged

jcansdale merged 2 commits into
masterfrom
fixes/1908-unicode-error

Conversation

@grokys

@grokys grokys commented Oct 23, 2018 •

Copy link
Copy Markdown
Contributor

When comparing files in a PR. we're currently taking a look at the file on disk and converting the encoding of the LHS of the comparison to match the on-disk file. However, if the file doesn't exist locally, we were returning Encoding.Default for this value, which was causing the unicode errors seen in #1908.

This PR changes to behavior to return null if the file doesn't exist locally, and if a null encoding is passed to PullRequestService.ExtractToTempFile then just write the contents out without any encoding.

Related

Fixes #1908.

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants